<template>
	<view class="cardstyle">
		<text class="titlebox">{{title}}</text>
		<view class="tipsbox">
			<text style="color: red;">置顶</text>
			<text>{{author}}</text>
			<text>{{comments}}评</text>
			<text style="flex: 1; display: flex; justify-content: end;">
				<text>{{time}}</text>
			</text>
		</view>
	</view>
</template>

<script>
	export default {
		name:"cardViewText",
		data() {
			return {
				// title:"乘势而上，续写中国奇迹新篇章——党的二十届四中全会侧记",
				// isTop:true,
				// author:"新华社",
				// comments:56,
				// time:"2025.10.25"
			};
		},
		props: {
			title: {
				type: String,
				default: "新闻标题",
				require: true
			},
			isTop: {
				type: Boolean,
				default: false,
				require: true
			},
			author: {
				type: String,
				default: "来源",
				require: true
			},
			comments: {
				type: Number,
				default: 0,
				require: true
			},
			time: {
				type: String,
				default: "2025.1.1"
			},

		},
	}
</script>

<style>
	.cardstyle {
	  background-color: #f9d4e5;
	  padding: 10px;
	  border-radius: 6px; 
	}
	.titlebox {
	  font-size: 16px;
	  font-weight: bold;
	  color: #000; 
	  display: block; 
	  margin-bottom: 8px;
	  display: flex;
	}
	.tipsbox {
	  display: flex;
	  align-items: center;
	  font-size: 12px;
	  color: #666; 
	}

</style>